const {User} = require('../../mongodb/models')

module.exports =[
    {
        path:'/test',
        method:'get',
        process: async (ctx, next) => {
					var doc = await User.findOne({email:ctx.query.email,password:ctx.query.pwd}, (err, doc)=>doc)
					ctx.response.body = {
						errCode: doc ? 0 : 10001,
						errMsg: doc ? 'request:success' : '用户名或密码错误',
						data: doc ? {
							_id: doc._id,
							adminAuth: doc.adminAuth,
							email: doc.email
						} : {}
					}
        }
    }
]